//
//  SRBookPageModel.m
//  StoryShow
//
//  Created by CyonLeuMBP on 2017/4/17.
//  Copyright © 2017年 qudiandu.cn. All rights reserved.
//

#import "SRBookPageModel.h"
#import "SRBookPageTrackItemModel.h"


@implementation SRBookPageModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    NSMutableDictionary *dict = [[super JSONKeyPathsByPropertyKey] mutableCopy];
    
    NSDictionary *addDict =  @{
                               @"pageID": @"page_id",
                               @"pageName": @"page_name",
                               @"pageURL": @"page_url",
                               
                               @"catalogue_id": @"catalogue_id",
                          
                               @"tracks": @"track"
                               };
    [dict addEntriesFromDictionary:addDict];
    
    return dict;
}


+ (NSValueTransformer *)tracksJSONTransformer {
    return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:[SRBookPageTrackItemModel class]];
}

@end
